<?php
/**
 *
 * Project:     Neuf TV MediaCenter - MP9CTL
 * File:        status.inc.php
 *
 * Page de statut
 *
 * @author Julien J. pour Neuf Cegetel
 *
 */

/* Definition des partages */
require(getConfFile());

$serverName = getHostname();
$serverOS = getOSType();
$INTERFACES = "./interface/";
$dir = opendir($INTERFACES);

 
?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
    <head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta hostname="<?= $serverName ?>" />
	<meta os="<?= $serverOS ?>" />
	<meta version="<?= VERSION ?>" />
<?php foreach(getInterfacesList() as $interface) { ?>
	<meta interface="<?= $interface['url'] ?>" name="<?= $interface['name'] ?>" />
<?php } ?>
	<title>MediaCenter - Neuf TV HD</title>
	<link rel="StyleSheet" href="../style.css" type="text/css" />
    </head>
    <body>
	<div class="header"><img src="../mclogo.png" /></div>
	<div class="separ"></div>
	<div class="zone">
	    <div class="tab">Informations g&eacute;n&eacute;rales</div>
	    <div class="zoneContent">
	    	<table class="list">
		    <tr><th>Version</th><td><?= VERSION ?></td></tr>
		    <tr><th>Date</th><td><?= strftime('%d/%m/%Y', strtotime(VERSION_DATE)) ?></td></tr>
			<tr><th>OS</th><td><?= $serverOS ?></td></tr>
		</table>
	    </div>
	</div>
	<div class="zone">
	    <div class="tab">Partages actifs</div>
	    <div class="zoneContent">
	    	<table class="list">
		    <tr><th>#</th><th>Nom du partage</th><th>Chemin d'acc&egrave;s</th></tr>
<?php $i = 1; foreach ($shares as $share) { ?>
		    <tr><td><?= $i++ ?></td><td><?= $share['name'] ?></td><td><?= $share['path'] ?></td></tr>
<?php } ?>
		</table>
		<br />
		<a href="/mp9ctl/config.php">Configuration manuelle</a><br />
		<br />
		<a href="/mp9ctl/config.php?mode=tree">Configuration simplifi&eacute;e</a> (le chargement peut durer plusieurs dizaines de secondes)</i>
	    </div>
	</div>
	<div class="zone">
	    <div class="tab">Interfaces d&eacute;tect&eacute;es</div>
	    <div class="zoneContent">
	    	<table class="list">
		    <tr><th>#</th><th>Nom de l'interface</th></tr>
<?php $i = 1; foreach (getInterfacesList() as $interface) { ?>
		    <tr><td><?= $i++ ?></td><td><?= $interface['name'] ?></td></tr>
<?php } ?>
		</table>
	    </div>
	</div>
    </body>
</html>
